package cn.orange.demo;

import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import cn.orange.demo.clock_demo.ClockDemo;
import cn.orange.demo.stopTimer.stopTimer;

public class MainActivity extends ListActivity {

	private ArrayAdapter<ListCellData> adapter;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        adapter=new ArrayAdapter<ListCellData>(this,android.R.layout.simple_list_item_1);
        setListAdapter(adapter);
        adapter.add(new ListCellData(this, "use radio group",new Intent(this,usingRadioGroup.class))); 
        adapter.add(new ListCellData(this, "ClockDemo",new Intent(this,ClockDemo.class))); 
        
    }
	@Override
	protected void onListItemClick(ListView l, View v, int position, long id) {
		super.onListItemClick(l, v, position, id);
		ListCellData data=adapter.getItem(position);
		data.startActivity();
	}

//	@Override
//	protected void onDestroy() {
//		mstopTimer.destory();
//		super.onDestroy();
//	}
	private stopTimer mstopTimer;
} 

